/**
 * Created by sergey on 16.06.2014.
 */
import java.util.Scanner;
public class KvadratnoeUravnenie {
    public static void main (String args[]){
        Scanner in = new Scanner(System.in);
        double a, b, c, d;
        System.out.println("Enter value of a: ");
        a = in.nextDouble();
        System.out.println("Enter value of b: ");
        b = in.nextDouble();
        System.out.println("Enter value of c: ");
        c = in.nextDouble();
        //d=KvadratnoeUravnenie.discriminant(a, b, c);
        //KvadratnoeUravnenie.solve(d,b);
        DiscriminantFinder disc = new DiscriminantFinder();
        double d1 = disc.discriminant(a,b,c);
        EquationSolver sol = new EquationSolver(d1,b);
        sol.solve(d1,b);


    }
    //public static double discriminant(double a, double b, double c){
        //double d=Math.pow(b, 2) - (4 * a * c);
        //return d;}
    //public static void solve(double d, double b){
        //double x1, x2;
        //if (d>0){
           // x1 = ((-1) * b + Math.sqrt(d)) / 2;
           // x2 = ((-1) * b - Math.sqrt(d)) / 2;
            //System.out.printf("x1 = " + x1 + " x2 = " + x2);}
        //else if (d == 0){
          //  x1 = (-1) * b;
            //System.out.printf("x1, x2 = " + x1);
        //}
        //else
          //  System.out.print("Error. D less than 0");
        //}
    }


